<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Sobey · 索贝微信平台管理系统</title>

    {js href='__STATIC__/layui/layui.js' /}
    <link rel="stylesheet" type="text/css" href="__STATIC__/admin/login/style.css" tppabs="__STATIC__/admin/login/style.css" />
    <style>
        body{height:100%;background:#16a085;overflow:hidden;}
        canvas{z-index:-1;position:absolute;}
    </style>
    <script src="__STATIC__/admin/login/jquery.js"></script>
    <script src="__STATIC__/admin/login/Particleground.js" tppabs="__STATIC__/admin/login/Particleground.js"></script>
    <script>
        $(document).ready(function() {
            //粒子背景特效
            $('body').particleground({
                dotColor: '#5cbdaa',
                lineColor: '#5cbdaa'
            });

        });
    </script>
</head>
<body>
<form class="layui-form" id="loginform">
<dl class="admin_login">
    <dt>
        <strong style="color:#fff;">Sobey · 索贝微信平台管理系统</strong>
        <em>Sobey System</em>
    </dt>
    <dd class="user_icon">
        <input type="text" placeholder="账号" class="login_txtbx" name="user_name" lay-verify="required"/>
    </dd>
    <dd class="pwd_icon">
        <input type="password" placeholder="密码" name="password" class="login_txtbx" lay-verify="required"/>
    </dd>
    <dd class="val_icon">
        <div class="checkcode">
            <input name="verify" type="text" id="J_codetext" placeholder="验证码" lay-verify="required"   maxlength="6" class="login_txtbx">
            <img src="{:url('verify')}" onclick="this.src='{:url('verify')}?'+Math.random();" style="width: 150px;height: 42px;float: right;">
            <!--<canvas class="J_codeimg" id="myCanvas" onclick="createCode()">对不起，您的浏览器不支持canvas，请下载最新版浏览器!</canvas>-->
        </div>
        <!--<input type="button" value="验证码核验" class="ver_btn" onClick="validate();">-->
    </dd>
    <dd>
        <input type="submit" value="立即登陆" class="submit_btn" lay-submit="" lay-filter="login" />
    </dd>
    <!--<dd>-->
        <!--<p>© 2015-2016 jq22 版权所有</p>-->
        <!--<p>陕B2-8998988-1</p>-->
    <!--</dd>-->
</dl>
</form>


<script>

    layui.use('form', function () {
        (function () {
            var isIE = function () {
                var U = navigator.userAgent,
                    IsIE = U.indexOf('MSIE') > -1,
                    a = IsIE ? /\d+/.exec(U.split(';')[1]) : 'no ie';
                return a <= 8;
            }();
            if (isIE) {
                layer.alert('你的浏览器内核版本过低,若有极速模式请选择使用极速模式或者使用谷歌、火狐浏览器。');
            }
        })();
        var form = layui.form;
        form.on('submit(login)', function (data) {

            $.post(
                "{:url('Login/index')}",
                data.field,
                function (obj) {
                    if (obj.code == 200) {
                        layer.msg(obj.msg, {icon: 1, time: 2000}, function () {
                            location.href = "{:url('mp/index/mplist')}";
                        });
                    } else {
                        layer.alert(obj.msg);
                    }
                },
                "json"
            );
            return false;
        });
    });
</script>
</body>
</html>
